<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改设备信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${equipInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">设备名称：</label>
                <div class="col-sm-8">
                    <input name="equipName" th:field="*{equipName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">设备编号：</label>
                <div class="col-sm-8">
                    <input name="equipBh" th:field="*{equipBh}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备价格：</label>
                <div class="col-sm-8">
                    <input name="equipPrice" th:field="*{equipPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">部门ID：</label>
                <div class="col-sm-8">
                    <input name="deptId" th:field="*{deptId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">负责人ID：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备厂家：</label>
                <div class="col-sm-8">
                    <input name="equipFactory" th:field="*{equipFactory}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">设备厂家电话：</label>
                <div class="col-sm-8">
                    <input name="equipFactoryPhone" th:field="*{equipFactoryPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否高值设备：</label>
                <div class="col-sm-8">
                    <select name="equipValue" class="form-control m-b" th:with="type=${@dict.getType('equip_value')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{equipValue}"></option>
                    </select>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">报废审核标志：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="equipScrap" th:field="*{equipScrap}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">维修审核标志：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="equipMaintain" th:field="*{equipMaintain}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">设备状态(0建账|1已用|2维修|3报废)：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <select name="equipStatus" class="form-control m-b" th:with="type=${@dict.getType('equip_status')}">-->
<!--                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{equipStatus}"></option>-->
<!--                    </select>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">维修备注：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <textarea name="equipMemark" class="form-control">[[*{equipMemark}]]</textarea>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">报废备注：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <textarea name="equipSremark" class="form-control">[[*{equipSremark}]]</textarea>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">删除标志：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="equipDelete" th:field="*{equipDelete}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">报废时间：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="input-group date">-->
<!--                        <input name="equipScrapTime" th:value="${#dates.format(equipInfo.equipScrapTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">购置日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="equipBuyTime" th:value="${#dates.format(equipInfo.equipBuyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "equipment/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }

        $("input[name='equipScrapTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='equipBuyTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>
